package com.xmx.es.repositories;

import com.xmx.es.entity.Article;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;


import java.util.List;

/**
 * @Author Xumx
 * @Date 2021/4/14 23:38
 * @Version 1.0
 */
public interface ArticleRepository extends ElasticsearchRepository<Article,Long> {
    List<Article> findByTitle(String title);

    List<Article> findByTitleOrContent(String title,String content);

    List<Article> findByTitleOrContent(String title, String content, Pageable pageable);

    List<Article> findByTitleAndContent(String title, String content, Pageable pageable);
}
